home *** CD-ROM | disk | FTP | other *** search
/ Die Speccy' 97 / Die Speccy' 97.iso / amiga_system / the_aminet / util / libs / mufs_usergroup.lha / usergroup / Smakefile < prev    next >
Makefile  |  1992-09-02  |  6KB  |  235 lines

  1. # $Id: Smakefile,v 4.4 1994/05/18 16:00:14 ppessi Exp $
  2. #
  3. # Smakefile for usergroup.library
  4. #
  5. # Copyright ⌐ 1993 AmiTCP/IP Group, <amitcp-group@hut.fi>
  6. #                  Helsinki University of Technology, Finland.
  7. #
  8. # Created      : Sun Nov 28 17:25:35 1993 ppessi
  9. # Last modified: Wed May 18 18:56:54 1994 ppessi
  10. #
  11. # $Log: Smakefile,v $
  12. # Revision 4.4  1994/05/18  16:00:14  ppessi
  13. # Added FD into installed include files
  14. #
  15. # Revision 4.3  1994/05/18  00:18:59  ppessi
  16. # Updated version number
  17. #
  18. # Revision 4.2  1994/05/17  07:38:06  ppessi
  19. # Added a warning for libinit.c patching
  20. #
  21. # Revision 4.1  1994/05/16  14:09:07  ppessi
  22. # Added a patch rule for libinit.c
  23. #
  24. # Revision 3.3  1994/02/25  21:45:19  ppessi
  25. # Changed the installing order
  26. #
  27. # Revision 3.2  1994/02/25  15:02:14  ppessi
  28. # Added rules for include directories
  29. #
  30. # Revision 3.1  1994/02/24  16:49:34  ppessi
  31. # Release 3.
  32. #
  33. # Revision 2.3  1994/02/17  12:09:16  ppessi
  34. # Release 2
  35. #
  36. # Revision 2.2  1994/02/17  02:24:08  ppessi
  37. # Saving before downgrading library
  38. #
  39. # Revision 2.1  1994/01/23  03:25:56  ppessi
  40. # Added line debugging and document generation
  41. #
  42. # Revision 1.4  1994/01/21  12:36:33  ppessi
  43. # Updated include handling. Added documentation extraction.
  44. #
  45. # Revision 1.3  1994/01/20  16:15:09  ppessi
  46. # Changed default flags to optimize
  47. #
  48. # Revision 1.2  1994/01/20  08:30:31  ppessi
  49. # Don't use SAS supplied libintr.o, use mine.
  50. #
  51. # Revision 1.1  94/01/19  10:05:16  ppessi
  52. # Initial revision
  53. #
  54.  
  55. NAME=  usergroup
  56. VERS= 4
  57. REV=  1
  58.  
  59. SRCS=    $(NAME).c credential.c resource.c \
  60.     getutent.c getpwent.c getgrent.c \
  61.     initgroups.c loginname.c time.c \
  62.     getpass.c crypt.c console.c \
  63.     random.c assert.c libinit.c 
  64. OBJS=   $(NAME).o credential.o resource.o \
  65.     getutent.o getpwent.o getgrent.o \
  66.     initgroups.o loginname.o time.o \
  67.     getpass.o crypt.o console.o \
  68.     random.o assert.o
  69. STARTUP= libinitr.o
  70.  
  71. RESOURCE= #credential.resource
  72.  
  73. RSRCS=  credres.c 
  74. ROBJS=  credres.o 
  75.  
  76. LIBS=
  77. DEBUGLIBS=
  78.  
  79. # These include and FD files are created with gawk
  80. INCS_CLIB=   include/clib/$(NAME)_protos.h 
  81. INCS_PRAGMA= include/pragmas/$(NAME)_pragmas.h
  82. FD=          fd/$(NAME)_lib.fd
  83. INCS_GEN=    $(INCS_CLIB) $(INCS_PRAGMA) $(FD)
  84.  
  85. DOCS=   usergroup.doc
  86.  
  87. CC=      sc
  88. LD=      slink
  89. MAKE=    smake
  90. TAGS=    etags
  91. RM=      delete quiet
  92. MKDIR=   makedir
  93. INSTALL= copy nopro dates all
  94. BUMPREV= BumpRev
  95. RCSREV=  rcsrev
  96. CAT=     type 
  97. AWK=     gawk
  98. AUTODOC= autodoc  -C -I -c -t8
  99. PATCH=   sc:c/spatch
  100.  
  101. DEST=    AmiTCP:
  102.  
  103. DESTINCLUDE= $(DEST)netinclude $(DEST)netinclude/clib \
  104.     $(DEST)netinclude/pragmas $(DEST)netinclude/fd
  105.  
  106. OPTFLAGS= Optimize Stripdebug Debug=Line
  107. CFLAGS = $(OPTFLAGS)
  108. LDFLAGS= stripdebug noicons
  109.  
  110. # "DEF=RCS_ID_C=static char *rcsid"
  111. DEFS=    DEF=RCS_ID_C=// DEF=AMIGA=1  DEF=FAR
  112. IDIRS=   IDIR=include IDIR=netinclude: 
  113. SCOPTIONS= stringmerge structureequivalence \
  114.      nostackcheck nomultipleincludes \
  115.      noerrorsource noversion noerrorhighlight \
  116.      smallcode smalldata \
  117.      map maphunk mapsymbols maplib mapxreference \
  118.      linkeroptions=plain noicons batch \
  119.      optinl opttime optcomp=5 optdep=5 optrdep=5 \
  120.      $(IDIRS) $(DEFS) \
  121.      LibCode
  122.  
  123. all: $(NAME).library $(RESOURCE)
  124.  
  125. $(NAME).library: SCOPTIONS $(STARTUP) $(OBJS) $(FD)
  126.     $(LD) with <<
  127.     TO $(NAME).library $(LDFLAGS)
  128.     LIBPREFIX _R_ LIBFD $(FD)
  129.     FROM lib:libent.o $(STARTUP) $(OBJS) LIB lib:sc.lib 
  130.     noicons SD batch MAP $(NAME).map FHLSX
  131.     Libversion $(VERS) Librevision $(REV)
  132. <
  133. #    $(CC) LINK TO $@ OBJ $(OBJS) BATCH $(LIBS) $(CFLAGS)
  134.  
  135. debug:
  136.     $(MAKE) "CFLAGS=$(DEBUGFLAGS)" "LIBS=$(DEBUGLIBS)" all
  137.  
  138. $(NAME).doc: $(SRCS)
  139.     $(AUTODOC) $(SRCS) >$@
  140.  
  141. include/clib/$(NAME)_protos.h: libfunc.h include/clib
  142.     $(AWK) -f make_fd.awk -v "what=protos" $< > $@
  143.  
  144. include/pragmas/$(NAME)_pragmas.h: libfunc.h include/pragmas
  145.     $(AWK) -f make_fd.awk -v "what=pragmas" $< > $@
  146.  
  147. $(FD): libfunc.h fd
  148.     $(AWK) -f make_fd.awk -v "what=fd" $< > $@
  149. #
  150. # Create libinit.c 
  151. #
  152. # If you can not apply this patch, probably because your SAS C is newer or
  153. # older than our compiler, you can use the sc:source/libinit.c as such.
  154. # There are a few bugs but nothing fatal.
  155. libinit.c: sc:source/libinit.c libinit.pch
  156.     $(PATCH) -o$@ -plibinit.pch sc:source/libinit.c
  157.  
  158. .c.o:
  159.     -@$(RM) $*.o  > nil:
  160.     $(CC) $(CFLAGS) $*.c
  161.  
  162. credres.o: credres.c
  163.     $(CC) $(CFLAGS) nolibcode DATA=faronly credres.c 
  164.  
  165. credential.resource: credres.o
  166.     $(CC) $(CFLAGS) link credres.o to $@ noicons nostartup
  167.  
  168. $(STARTUP): libinit.c
  169.     $(CC) optimize debug=line libinit.c OBJNAME=$@
  170.  
  171. $(NAME).library_rev.h: $(NAME).c
  172.     -$(RCSREV) $(NAME).library $(NAME).c
  173.  
  174. credential_rev.h: credential.h
  175.     -$(RCSREV) credential credential.h
  176. resource.o: credential_rev.h
  177.  
  178. SCOPTIONS: Smakefile
  179.     copy to $@ <from < 
  180. $(SCOPTIONS)
  181. <
  182.  
  183. mininstall: all $(DEST)libs
  184.     $(INSTALL) $(NAME).library $(RESOURCE) $(DEST)libs
  185.  
  186. install: mininstall $(DOCS) $(DEST)doc $(DESTINCLUDE) $(INCS_GEN)
  187.     $(CAT) $(DOCS) > $(DEST)doc/$(NAME).doc
  188.     $(INSTALL) $(INCS_CLIB) $(DEST)netinclude/clib
  189.     $(INSTALL) $(INCS_PRAGMA) $(DEST)netinclude/pragmas
  190.     $(INSTALL) $(FD) $(DEST)netinclude/fd
  191.  
  192. $(DEST)libs:
  193.     -$(MKDIR) $@
  194. $(DEST)doc:
  195.     -$(MKDIR) $@    
  196. $(DEST)netinclude:
  197.     -$(MKDIR) $@    
  198. $(DEST)netinclude/clib:
  199.     -$(MKDIR) $@    
  200. $(DEST)netinclude/pragmas:
  201.     -$(MKDIR) $@    
  202. $(DEST)netinclude/fd:
  203.     -$(MKDIR) $@    
  204. fd: 
  205.     -$(MKDIR) $@    
  206. include: 
  207.     -$(MKDIR) $@    
  208. include/clib: include
  209.     -$(MKDIR) $@    
  210. include/pragmas: include
  211.     -$(MKDIR) $@    
  212.  
  213. TAGS:    $(SRCS)
  214.     $(TAGS) $(SRCS)
  215.  
  216. clean:
  217.     -$(RM) \#?(_rev.?|.o|.map|.lnk|.info) SCOPTIONS
  218.  
  219. cleaner: clean
  220.     -$(RM) $(NAME).library $(RESOURCE)
  221.  
  222. # DO NOT DELETE THIS LINE -- make depend depends on it.
  223. $(NAME).o: $(NAME).c libfunc.h base.h credential.h $(GINCS)
  224. credres.o : credres.c base.h credential_rev.h credential.h $(GINCS)
  225. credential.o : credential.c libfunc.h base.h credential.h $(GINCS)
  226. getpwent.o: getpwent.c libfunc.h base.h $(GINCS)
  227. getgrent.o: getgrent.c libfunc.h base.h $(GINCS)
  228. crypt.o: crypt.c libfunc.h base.h $(GINCS)
  229. loginname.o: loginname.c libfunc.h base.h credential.h $(GINCS)
  230. getutent.o: getutent.c libfunc.h base.h credential.h $(GINCS)
  231. getpass.o : getpass.c libfunc.h base.h $(GINCS)
  232. console.o: console.c libfunc.h base.h $(GINCS)
  233. assert.o: assert.c  base.h $(GINCS)
  234.